POV-Ray : Newsgroups : povray.advanced-users : Problems with macro (3.6) : Re: Problems with macro (3.6) Server Time
29 Jun 2024 02:17:45 EDT (-0400)
  Re: Problems with macro (3.6)  
From: SharkD
Date: 9 Jun 2010 20:15:14
Message: <4c102e92$1@news.povray.org>
On 6/9/2010 6:39 PM, clipka wrote:
> It should work with any color literal syntax you can imagine, such as
> "color red R", "color rgb GREY filter F", "color rgbft <R,G,B,F,T>", or
> what-have-you.
>
> (BTW, I suggest using Mixed_Case identifiers for anything you name
> yourself, as lower_case identifiers pose a risk of conflicting with
> future SDL keywords.)

It didn't work for me, in 3.6 at least. Example:

     #macro Gamma_Adjust(In_Color)
     #local Out_Gamma = 2.2;
       rgbft <
         pow(In_Color.red,   Out_Gamma),
         pow(In_Color.green, Out_Gamma),
         pow(In_Color.blue,  Out_Gamma),
         In_Color.filter,
         In_Color.transmit
       >
     #end

     #declare test_color = Gamma_Adjust(<1,1,1>);

Results in an "Bad operands for period operator" error.

-- 
http://isometricland.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.